Integrand size = 24, antiderivative size = 43 \[ \int \cos (c+d x) (a \cos (c+d x)+b \sin (c+d x)) \, dx=\frac {a x}{2}+\frac {a \cos (c+d x) \sin (c+d x)}{2 d}+\frac {b \sin ^2(c+d x)}{2 d} \]
[Out]
Time = 0.05 (sec) , antiderivative size = 43, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.208, Rules used = {3169, 2715, 8, 2644, 30} \[ \int \cos (c+d x) (a \cos (c+d x)+b \sin (c+d x)) \, dx=\frac {a \sin (c+d x) \cos (c+d x)}{2 d}+\frac {a x}{2}+\frac {b \sin ^2(c+d x)}{2 d} \]
[In]
[Out]
Rule 8
Rule 30
Rule 2644
Rule 2715
Rule 3169
Rubi steps \begin{align*} \text {integral}& = \int \left (a \cos ^2(c+d x)+b \cos (c+d x) \sin (c+d x)\right ) \, dx \\ & = a \int \cos ^2(c+d x) \, dx+b \int \cos (c+d x) \sin (c+d x) \, dx \\ & = \frac {a \cos (c+d x) \sin (c+d x)}{2 d}+\frac {1}{2} a \int 1 \, dx+\frac {b \text {Subst}(\int x \, dx,x,\sin (c+d x))}{d} \\ & = \frac {a x}{2}+\frac {a \cos (c+d x) \sin (c+d x)}{2 d}+\frac {b \sin ^2(c+d x)}{2 d} \\ \end{align*}
Time = 0.06 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.07 \[ \int \cos (c+d x) (a \cos (c+d x)+b \sin (c+d x)) \, dx=\frac {a (c+d x)}{2 d}-\frac {b \cos ^2(c+d x)}{2 d}+\frac {a \sin (2 (c+d x))}{4 d} \]
[In]
[Out]
Time = 0.40 (sec) , antiderivative size = 36, normalized size of antiderivative = 0.84
method | result | size |
risch | \(\frac {a x}{2}-\frac {b \cos \left (2 d x +2 c \right )}{4 d}+\frac {a \sin \left (2 d x +2 c \right )}{4 d}\) | \(36\) |
parallelrisch | \(\frac {2 a x d -b \cos \left (2 d x +2 c \right )+a \sin \left (2 d x +2 c \right )+b}{4 d}\) | \(36\) |
derivativedivides | \(\frac {a \left (\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )-\frac {\cos \left (d x +c \right )^{2} b}{2}}{d}\) | \(41\) |
default | \(\frac {a \left (\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )-\frac {\cos \left (d x +c \right )^{2} b}{2}}{d}\) | \(41\) |
parts | \(\frac {a \left (\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )}{d}+\frac {b \sin \left (d x +c \right )^{2}}{2 d}\) | \(43\) |
norman | \(\frac {\frac {a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}+a x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+\frac {a x}{2}-\frac {a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{d}+\frac {a x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{2}+\frac {2 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{d}}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{2}}\) | \(99\) |
[In]
[Out]
none
Time = 0.26 (sec) , antiderivative size = 35, normalized size of antiderivative = 0.81 \[ \int \cos (c+d x) (a \cos (c+d x)+b \sin (c+d x)) \, dx=\frac {a d x - b \cos \left (d x + c\right )^{2} + a \cos \left (d x + c\right ) \sin \left (d x + c\right )}{2 \, d} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 73 vs. \(2 (36) = 72\).
Time = 0.10 (sec) , antiderivative size = 73, normalized size of antiderivative = 1.70 \[ \int \cos (c+d x) (a \cos (c+d x)+b \sin (c+d x)) \, dx=\begin {cases} \frac {a x \sin ^{2}{\left (c + d x \right )}}{2} + \frac {a x \cos ^{2}{\left (c + d x \right )}}{2} + \frac {a \sin {\left (c + d x \right )} \cos {\left (c + d x \right )}}{2 d} - \frac {b \cos ^{2}{\left (c + d x \right )}}{2 d} & \text {for}\: d \neq 0 \\x \left (a \cos {\left (c \right )} + b \sin {\left (c \right )}\right ) \cos {\left (c \right )} & \text {otherwise} \end {cases} \]
[In]
[Out]
none
Time = 0.21 (sec) , antiderivative size = 37, normalized size of antiderivative = 0.86 \[ \int \cos (c+d x) (a \cos (c+d x)+b \sin (c+d x)) \, dx=-\frac {2 \, b \cos \left (d x + c\right )^{2} - {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} a}{4 \, d} \]
[In]
[Out]
none
Time = 0.27 (sec) , antiderivative size = 35, normalized size of antiderivative = 0.81 \[ \int \cos (c+d x) (a \cos (c+d x)+b \sin (c+d x)) \, dx=\frac {1}{2} \, a x - \frac {b \cos \left (2 \, d x + 2 \, c\right )}{4 \, d} + \frac {a \sin \left (2 \, d x + 2 \, c\right )}{4 \, d} \]
[In]
[Out]
Time = 21.44 (sec) , antiderivative size = 35, normalized size of antiderivative = 0.81 \[ \int \cos (c+d x) (a \cos (c+d x)+b \sin (c+d x)) \, dx=\frac {a\,x}{2}-\frac {b\,\cos \left (2\,c+2\,d\,x\right )}{4\,d}+\frac {a\,\sin \left (2\,c+2\,d\,x\right )}{4\,d} \]
[In]
[Out]